import request from "../service/request";
// 获取关卡信息
export function getLevels() {
    return request({
        url: "/game/info/getLevels",
        method: "GET"
    })
}
// 保存通关记录
export function playerAdd(data) {
    return request({
        url: "/game/player/add",
        method: "post",
        data
    })
}
// 创建房间
export function roomAdd(data) {
    return request({
        url: "/game/room/add",
        method: "post",
        data
    })
}
// 修改房间
export function roomUpdate(data) {
    return request({
        url: "/game/room/update",
        method: "post",
        data
    })
}
// 加入房间
export function join(data) {
    return request({
        url: "/game/room/joinRoom",
        method: "post",
        data
    })
}
// 选择关卡
export function changeLevel(data) {
    return request({
        url: "/game/room/selectLevel",
        method: "post",
        data
    })
}
// 离开房间
export function leave(data) {
    return request({
        url: "/game/room/leaveRoom",
        method: "post",
        data
    })
}
// 修改准备状态
export function roomChangeReady(data) {
    return request({
        url: "/game/room/changeReady",
        method: "post",
        data
    })
}
// 解散房间
export function dissolve(data) {
    return request({
        url: "/game/room/dissolveRoom",
        method: "post",
        data
    })
}
// 房间详情
export function info(id) {
    return request({
        url: "/game/room/info?id="+id,
        method: "get"
    })
}
